package com.mmg.spzx.manager.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.mmg.spzx.manager.mapper.SysOperLogMapper;
import com.mmg.spzx.manager.service.SysOperLogService;
import com.mmg.spzx.model.dto.system.SysOperLogDto;
import com.mmg.spzx.model.entity.system.SysOperLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysOperLogServiceImpl implements SysOperLogService {

    @Autowired
    private SysOperLogMapper sysOperLogMapper;

    @Override
    public PageInfo<SysOperLog> findByPage(Integer page, Integer limit, SysOperLogDto sysOperLogDto) {
        PageHelper.startPage(page, limit);
        List<SysOperLog> sysOperLogList = sysOperLogMapper.findByPage(sysOperLogDto);
        return new PageInfo<>(sysOperLogList);
    }
}
